<template>
  <div style="min-height: 350px;">
    <el-empty v-if="replyToMe.length == 0" description="你还没有消息呢" />

    <div v-for="reply in replyToMe">
      <el-row style="
            margin-bottom: 10px;
            padding: 10px 0;
            border-bottom: 1px #e4e7ed solid;
          ">
        <el-col :span="2">
          <el-avatar :src="reply.avatar" :size="70"></el-avatar>
        </el-col>
        <el-col :span="22">
          <p>
            <el-link>{{ reply.nickname }}</el-link>
          </p>
          <p style="margin: 5px 0">
            回复了我的文章
            <el-link style="font-size: 16px; line-height: 16px" :href="reply.href">{{ reply.title }}
            </el-link>
            ，内容为 “{{ reply.content }}”
          </p>
          <p>
            <el-link :href="reply.articleHref">回复</el-link>
          </p>
        </el-col>
      </el-row>
    </div>
  </div>

</template>
<script>
export default {
  data() {
    return {
      userId: 2,
      activeName: 'myResponse',
      replyToMe: [

      ],
    };
  },
  methods: {
    // getCurrentLoginUser() {
    //   this.axios.get("http://localhost:9093/users/currentLogin").then(({ data }) => {
    //     console.log("222222")
    //     this.userId = data.data;
    //     this.getReplyToMe();
    //     this.markIsRead();
    //   })
    // },
    // handleClick(tab, event) {
    //   console.log(tab, event);
    // },
    // getReplyToMe() {
    //   let formData = new FormData();
    //   formData.append("id", this.userId);
    //   this.axios.post("http://localhost:9190/comments/listCommentMessages", formData).then(({ data }) => {
    //     this.replyToMe = data.data;
    //     this.replyToMe.forEach((item) => {
    //       item["href"] = "/article?id=" + item.articleId;
    //     })
    //   })
    // },
    // markIsRead() {
    //   let formData = new FormData();
    //   formData.append("id", this.userId);
    //   this.axios.post("http://localhost:9190/comments/markIsRead", formData).then(() => {
    //
    //   })
    // }
  },
  created() {
    this.getCurrentLoginUser();
  }
};
</script>
<style>
* {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB W3", "Hiragino Sans GB",
  "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
</style>
